// 引入所有的组件
import Hello from './Hello/index.vue'
import SvgIcon from './svgIcon/index.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 导入类型
import type { App, Component } from 'vue'
// 声明一个类型别名
type Obj = {
    [name: string]: Component
}
const arrComponetents: Obj = { Hello, SvgIcon }

export default {
    install(app: App) {
        Object.keys(arrComponetents).forEach((key) => {
            app.component(key, arrComponetents[key])
        })
        for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
        }
    },
}
